<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BOM : navigator</title>

    <script type="text/javascript">

        let ua = navigator.userAgent ;
        console.log( ua );

        let sua = ua.toLowerCase() ;
        let include = sua.includes( 'chrome' );
        console.log( include );

        let index = sua.indexOf( 'chrome' );
        console.log( index );

        let last = sua.lastIndexOf( ' ' );

        let browser = ua.substring( index , last );
        console.log( browser );

        console.log( navigator.platform );


    </script>

</head>
<body>
    
</body>
</html>